<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<title th:fragment="titleName">角色管理</title>
<style th:fragment="styles">
</style>
<div id="customModule" th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>角色管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index">Home</a>
                </li>
                <li>
                    <a>系统管理</a>
                </li>
                <li class="active">
                    <strong>角色管理</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-title">
                        <h5>功能列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <select class="form-control" id="roleChecked" v-model="roleChecked">
                                        <option value="-1">--全部角色--</option>
                                        <option :value="item.id" v-for="(item,index) in roleList">
                                            {{item.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <div class="form-group">
                                    <input autocomplete="off" class="form-control" id="roleNameCondition"
                                           placeholder="角色名称" type="text" v-model="roleNameCondition">
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <button @click="search()" class="btn btn-primary  btn-rounded  btn-sm" id="search"
                                        type="submit"><i
                                        class="fa fa-search"></i>&nbsp;搜索
                                </button>
                                <button @click="reset()" class="btn btn-warning  btn-rounded  btn-sm" id="refresh"
                                        type="submit"><i
                                        class="fa fa-refresh"></i>&nbsp;重置
                                </button>
                            </div>
                        </div>
                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group">
                                <a @click="addRecord();" class="btn btn-success" data-toggle="modal" v-if="isAdd"
                                   id="AddNew" name="AddNew">
                                    <i class="fa fa-plus"></i> 新增
                                </a>
                                <!--<a class="btn btn-primary single disabled">-->
                                <!--<i class="fa fa-edit"></i> 修改-->
                                <!--</a>-->
                                <!--<a class="btn btn-danger multiple disabled">-->
                                <!--<i class="fa fa-remove"></i> 删除-->
                                <!--</a>-->
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList">
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div aria-hidden="true" class="modal inmodal" id="myModalAdd" role="dialog" tabindex="-1">
        <div class="modal-dialog  modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal" type="button"><span
                            aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">角色信息</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->
                    <div class="tabs-container">
                        <div class="panel-body form-horizontal">
                            <form class="form-horizontal" id="myform">
                                <div class="row">
                                    <label class="col-lg-2 control-label">当前角色</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" maxlength="50"
                                                   placeholder="角色名称" type="text" v-model="roleName">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">角色编号</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control" maxlength="50"
                                                   placeholder="角色编号(系统自动生成)" readonly="readonly" type="text"
                                                   v-model="roleIDModel">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">角色描述</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input autocomplete="off" class="form-control"
                                                   maxlength="20" placeholder="角色描述"
                                                   type="text" v-model="description">
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button @click="saveRecord();" class="btn btn-success" id="save" name="save" type="button"
                            v-if="clickState != 'view'"><i
                            class="fa fa-save"></i>&nbsp;保存
                    </button>
                    <button class="btn btn-danger" data-dismiss="modal" id="close" name="close" type="button"><i
                            class="fa fa-close"></i>&nbsp;关 闭
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/role/role.js}"></script>
</div>
<script th:fragment="scripts" type="text/javascript">
    Role.init();
</script>
</html>